/**
 * This class holds information about a position of object on the board. 
 * Position has two public variables x and y.
 * @author mx109
 *
 */
public class Position {
	public int x=0,y=0;
	
	/**
	 * Default constructor creates a field with the coordinates (0, 0)
	 */
	Position(){}
	
	/**
	 * Constructor creates an object of class Position the same as given in the parameter
	 * @param pos object of class Position to be clone
	 */
	public Position(Position pos){
		x = pos.x;
		y = pos.y;
	}
	
	@Override
	public boolean equals(Object o){
		if (!(o instanceof Position)) return false;
		Position p = (Position)o;
		return (x == p.x && y == p.y);
	}
	
	/**
	 * Designers creating Position from the coordinates given by integers
	 * @param x coordinate value x
	 * @param y coordinate value y
	 */
	public Position(int x, int y){this.x=x; this.y=y;}
	public String toString(){return "("+x + " " + y+")";}
}
